package org.example.bean.spring;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

//@Component
public class MyDestoryBean implements InitializingBean, DisposableBean {
    @Override
    public void destroy() throws Exception {
        System.out.println("MyDestoryBean destroy");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("MyDestoryBean afterPropertiesSet");
    }
}
